package com.service.impl;

import com.dao.userDao;
import com.model.user;
import com.service.userService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

//@

//@Component("userService")
@Service("userServiceImpl")
public class userServiceImpl implements userService{

//    public com.dao.userDao getUserDao() {
//        return userDao;
//    }
//
//    public void setUserDao(com.dao.userDao userDao) {
//        this.userDao = userDao;
//    }

    @Autowired//spring会自动往userDao赋值
    private userDao userDao;

    @Override
    public void add(user u) {
        System.out.println("service 添加用户...");

        userDao.add(u);
    }
}
